TranslationsModule = { translations: null, translations_loaded: function () { this.translations = translations_compiled; return this.translations != null; }, }; $(function () { if (!TranslationsModule.translations_loaded()) { MetadataModule.failed_loading_metadata(); } }); function _t(translation) { if (typeof TranslationsModule.translations[translation] !== "undefined") { return TranslationsModule.translations[translation]; } else { return translation; } }